/**
 * 
 */
package com.ihg.hiex.admin.service.account;

import java.util.List;

import com.demo2do.core.entity.page.Page;
import com.ihg.hiex.admin.service.DataService;
import com.ihg.hiex.entity.user.Account;

/**
 * 
 * @author mohanlan
 *
 */
public interface AccountService extends DataService<Account> {
    
    /**
     * 
     * @param authority
     * @return
     */
    public int count(String authority);
    
    /**
     * 
     * @param authority
     * @param page
     * @return
     */
    public List<Account> list(String authority, Page page);
    
    /**
     * 
     * @param authority
     * @return
     */
    public List<Account> list(String authority);

    /**
     * load account by name(email)
     * 
     * @param name
     * @return
     */
    public Account loadByName(String name);
    
    /**
     * edit password
     * 
     * @param account
     * @param oldPassword
     * @param newPassword
     */
    public void editPassword(Account account, String oldPassword, String newPassword);

    /**
     * 
     * @param account
     */
    public void disable(Account account);
    
}
